Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue-139: Add Music #140

Merged
merged 6 commits into from
Dec 27, 2024

Conversation

Tysterman74
Copy link
Collaborator

@Tysterman74 Tysterman74 commented Dec 11, 2024

Description

Add music and SFX to game

Related issue(s)

#139

List of changes

Added the following tracks

  • area_1.wav
  • area_2.wav
  • area_3.wav
  • boss_1.wav
  • heal.wav
  • shop.wav

Other changes:

  • Added AudioManager and added it to Autoloader
  • Play heal.wav when entering Heal Event
  • Player shop.wav when entering Shop Event
  • When entering Mob Event, calculate the percentage complete the player is on the Map and play either area_1, area_2, or area_3
  • When reaching the top floor, play boss_1

Tests

N/A

Additional notes

N/A

@Tysterman74 Tysterman74 marked this pull request as ready for review December 12, 2024 04:01
@Tysterman74 Tysterman74 mentioned this pull request Dec 14, 2024
Copy link
Collaborator

@Turtyo Turtyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issue with the code as is, but I noticed some issues when playing the game:

  • There is no sound if I start with something else than a mob fight (in the case I tested, with a dialogue at the start, no music is playing)
  • The sound is game is not the same balance as the sound of the original music, it sounds like the music is played stronger on the left than the right ear (mostly noticeable for the area 1 music, but it's present on all musics)

#Scenes/SceneScripts/TestingScene.gd Outdated Show resolved Hide resolved
Copy link
Collaborator

@Turtyo Turtyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem anymore, apart from the fact I hear the music louder in my left ear than my right ear still.
I think this might be the reason : https://forum.godotengine.org/t/why-is-audio-only-played-from-the-left-earphone/21639
Basically, the 2D audio stream plays sounds relative to the camera, meaning that if we want it to be the same on both ears, we need to instantiate the AudioManager at the center of the screen.

I have two ideas for that:

  • either see if you can move the 2D audio stream with code from the AudioManager
  • if that's not possible, then create an instance of the AudioManager (ie a scene with the script of the AudioManager) and move it from there

I think the first solution would be better, as it's less heavy

@Turtyo Turtyo linked an issue Dec 21, 2024 that may be closed by this pull request
# Conflicts:
#	#Scenes/SceneScripts/ShopScene.gd
#	Global/Global_Enums.gd
#	project.godot
@Turtyo Turtyo merged commit fe436c2 into Saplings-Projects:main Dec 27, 2024
1 check failed
@Turtyo Turtyo mentioned this pull request Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add music to the game
2 participants